import 'package:flutter/material.dart';
import 'package:todo_flutter/generated/assets/todo_flutter_assets.dart';
import 'package:todo_flutter/todo_flutter.dart';

/// createTime: 2023/4/23 on 11:13
/// desc:
///
/// @author azhon
class CommonEmptyWidget extends BaseStatelessWidget {
  final double marginTop;
  final String? placeholderText;

  const CommonEmptyWidget({
    Key? key,
    this.marginTop = 129,
    this.placeholderText,
  }) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      color: Colors.white,
      padding: only(top: marginTop),
      child: Column(
        children: [
          const CommonImage(
            asset: TodoFlutterAssets.icEmpty,
            size: 162,
          ),
          Padding(
            padding: only(top: 8, left: 20, right: 20),
            child: CommonText(
              placeholderText ?? TodoLib.delegate(context).empty,
              fontSize: 13,
              lineHeight: 17,
              color: const Color(0xFF161619),
              textAlign: TextAlign.center,
            ),
          ),
        ],
      ),
    );
  }
}
